Trò chơi Tic-Tac-Toe, game đánh caro full source code
53.609 lượt xem;
- OnPickedUpScript.cs
- Scripts /
- DemoPickup /
- Demos /
- Photon Unity Networking /
- Assets /
- project /
1 using UnityEngine;
2 using System.Collections;
3
4 public class OnPickedUpScript : MonoBehaviour {
5
6 public void OnPickedUp(PickupItem item)
7 {
8 if (item.PickupIsMine)
9 {
10 Debug.Log("I picked up something. That's a score!");
11 PhotonNetwork.player.AddScore(1);
12 }
13 else
14 {
15 Debug.Log("Someone else picked up something. Lucky!");
16 }
17 }
18 }
2 using System.Collections;
3
4 public class OnPickedUpScript : MonoBehaviour {
5
6 public void OnPickedUp(PickupItem item)
7 {
8 if (item.PickupIsMine)
9 {
10 Debug.Log("I picked up something. That's a score!");
11 PhotonNetwork.player.AddScore(1);
12 }
13 else
14 {
15 Debug.Log("Someone else picked up something. Lucky!");
16 }
17 }
18 }